home *** CD-ROM | disk | FTP | other *** search
- /*
- File: MacCalendarCommon.h
-
- Contains: Definitions common to the application and control strip module.
-
- Written by: Martin Minow
-
- Copyright: © 1994-1997 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- You may incorporate this sample code into your applications without
- restriction, though the sample code has been provided "AS IS" and the
- responsibility for its operation is 100% yours. However, what you are
- not permitted to do is to redistribute the source as "DSC Sample Code"
- after having made changes. If you're going to re-distribute the source,
- we require that you make it clear in the source that the code was
- descended from Apple Sample Code, but that you've made changes.
-
- Edit History:
- 1.0d0 MM First "public" distribution.
- 1.0d1 MM Added the setup application.
- 1.0d2 MM Added balloon help to the setup dialog. Added a "can't
- find preference file alert." No substantive changes.
- 1.0d3 MM Some small fixes from the Status Bar author. Now hiliting
- the days of the week and today's date if shown.
- 1.0d4 MM Revised to use the current ControlStrip header file. Removed
- references to a local copy of Icons.h as the Universal Header
- distribution has this information. Shrunk next/last month buttons.
- Make a copy of the intlHdl so we don't change the system info.
- 1.0d5 MM Bug displaying October 1994 - blank first line.
- 1.0d6 MM Redid drawing routine.
- */
-
- #ifndef __MACCALENDARCOMMON__
- #define __MACCALENDARCOMMON__
-
- #define SystemSevenFiveOrLater 1
- #define OLDROUTINELOCATIONS 0
- #define OLDROUTINENAMES 0
- #define DEBUG 1
-
- #define kSetupAppCreator 'SCCF'
- #define kControlStripCreator 'SCAL'
-
- #define kVersionMajor 1
- #define kVersionMinor 0x10 // minor and bugfix share a single byte as BCD
- #define kVersionStage beta
- #define kVersionRelease 1
- #define kVersionIdent "1.1b1"
- #define kVersionString "1.1b1 © 1994-97 Apple Computer, Inc."
-
- #define kFirstIsSunday 1
- #define kFirstIsMonday 2
-
- #define kDefaultFontStr "Geneva"
- #define kDefaultSizeStr "9"
- #define kDefaultFirstDayStr "1"
- #define kDefaultDayNamesStr "\001S\001M\002Tu\001W\002Th\001F\001S\000"
-
- #ifndef REZ
-
- #include <Types.h>
-
- #ifndef FALSE
- #define FALSE 0
- #define TRUE 1
- #endif
-
- // Some macros that I just couldn't get rid of -- Quinn
-
- #define width(rect) ((rect).right - (rect).left)
- #define height(rect) ((rect).bottom - (rect).top)
- #define PicFrame(what) ((**(*globalPtr).what).picFrame) /* The picture frame rectangle */
-
- #define pstrcpy(dst, src) (BlockMoveData((src), (dst), (src)[0] + 1))
-
- #if DEBUG
- #define QAssert(mustBeTrue) if (mustBeTrue) { } else { Debugger(); }
- #else
- #define QAssert
- #endif
-
- /*
- * This is saved across restarts - it is set from "factory settings" if no
- * preference resource is found in the Status Bar preference file, and can
- * be changed by the MacCalendarSetup application.
- *
- * This structure is also published via Gestalt by the control strip module.
- * Because it's shared between 68K code (the module) and PPC code (the
- * PPC version of the setup application), this structure must be declared
- * using a standard alignment, in this case 68K.
- */
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif
-
- typedef struct SavedSettings {
- OSType signature; /* Our signature */
- OSType prefVersion; /* Preference revision level */
- UInt32 modCount; /* Change this to force module to notice changes in the remaining fields */
- Str255 dayNameString; /* Current date label string */
- Str255 fontName; /* Requested display font */
- short fontSize; /* Display font size */
- short firstDayOfWeek; /* Sunday == 1 */
- } SavedSettings, **SavedSettingsHandle;
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif
-
- /*
- * The value of kPrefVersion has no special significance. It should be changed
- * whenever the SavedSettings resource is changed, or whenever it you desire to
- * redefine the SavedSettings resource (for example, during debugging).
- */
- #define kPrefVersion ('1004') /* Change this to rebuild pref's */
-
- #endif /* REZ */
-
- #endif /* __MACCALENDARCOMMON__ */
-